1 using System.Collections;
2 using
System.Collections.Generic;
3 using
UnityEngine;
4
5 public
class MobileUICtrl : MonoBehaviour {
6
7     
public GameObject player;
8
9     PlayerCtrl playerCtrl;
10
11     
// Use this for initialization
12     
void Start()
13     {
14         playerCtrl = player.GetComponent<PlayerCtrl>();
15     }
16
17     
public void MobileMoveLeft()
18     {
19         playerCtrl.MobileMoveLeft();
20     }
21
22     
public void MobileMoveRight()
23     {
24         playerCtrl.MobileMoveRight();
25     }
26
27     
public void MobileMoveStop()
28     {
29         playerCtrl.MobileStop();
30     }
31
32     
public void MobileFireBullets()
33     {
34         playerCtrl.MobileFireBullets();
35     }
36
37     
public void MobileJump()
38     {
39         playerCtrl.MobileJump();
40     }
41 }


Use this for initialization




Trò chơi bắn đạn đơn giản sử dụng Unity 13.468 lượt xem

Gõ tìm kiếm nhanh...